---@class BuffEffect335101 : BaseBuffEffect
BuffEffect335101 = ClientFight.CreateClass("BuffEffect335101", ClientFight.BaseBuffEffect)
local t = BuffEffect335101

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};

    local fightResult = parameters[3];
    if (not AttackUtils.isDamage(fightResult.state)) then
        return IBuffEffect.FAIL;
    end

    local effectValue = buff.buffBean.f_BuffEffectValue;
    local random = fight.random(10000) + 1;
    local add = 0;
    if (random <= effectValue[1]) then
        add = effectValue[2];
    end
    if (random <= effectValue[3]) then
        add = effectValue[4];
    end
    if (random <= effectValue[5]) then
        add = effectValue[6];
    end
    add = add / Global.TEN_THOUSANDTH;
    local logAdd = add;
    fightResult.damage = (fightResult.damage * add);
    SkillRoleMgr.savePathFile(string.format("[%s][EFFECT]卡拉buff%s提高%s倍伤害",
            fight.frame, buff.modelId, logAdd
    ));
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()